package com.weiyuwqj.server.service.invite.impl;

import com.github.pagehelper.PageHelper;
import com.weiyuwqj.api.common.PageList;
import com.weiyuwqj.api.common.Paginator;
import com.weiyuwqj.api.model.BasUserInviteIncome;
import com.weiyuwqj.api.model.vo.BasUserInviteIncomeVo;
import com.weiyuwqj.api.service.BasUserInviteIncomeService;
import com.weiyuwqj.server.mapper.BasUserInviteIncomeMapper;
import com.weiyuwqj.server.mapper.BasUserInviteMapper;
import com.weiyuwqj.server.mapper.BasUserMapper;
import com.weiyuwqj.server.mapper.BusBonusRebateMapper;
import com.weiyuwqj.server.mapper.BusIncomeStatMapper;
import com.weiyuwqj.server.mapper.SysUserMapper;
import com.weiyuwqj.server.service.account.module.DealModule;
import com.weiyuwqj.server.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Yao xiuwei on 2015/12/2.
 */
@Service("userInviteIncomeService")
public class BasUserInviteIncomeServiceImp extends BaseServiceImpl<BasUserInviteIncome> implements BasUserInviteIncomeService {
    @Autowired
    BasUserInviteIncomeMapper inviteIncomeMapper;

    @Autowired
    BasUserInviteMapper userInviteMapper;



    @Autowired
    SysUserMapper sysUserMapper;


    @Autowired
    DealModule dealModule;

    @Autowired
    BasUserMapper basUserMapper;

    @Autowired
    BusBonusRebateMapper bonusRebateMapper;

    @Autowired
    BusIncomeStatMapper incomeStatMapper;


    //分页显示 & 查询
    @Override
    public PageList getList(Paginator p, Map<String, Object> param) {
        PageHelper.startPage(p.getPageNum(), p.getPageSize());
        return new PageList(inviteIncomeMapper.getList(param));

    }

    @Override
    public List<BasUserInviteIncomeVo> getList(Map<String, Object> param) {
        return inviteIncomeMapper.getList(param);
    }

    @Override
    public BasUserInviteIncomeVo getSingle(Integer id) {
        return inviteIncomeMapper.getSingle(id);
    }

}
